package tuse.components.tuseViewer.comment
{
	import UIFree.uif_component;
	
	import flash.events.Event;
	
	import tuse.components.ts_component;
	import tuse.components.ts_elipse;

	public class ts_particle extends ts_component {
		private var _speed	: Number;
		private var _spot	: ts_elipse;
		
		public function ts_particle(parent:uif_component, ax:int=0, ay:int=0, awidth:int=0, aheight:int=0, styleClass:String='') {
			super(parent, ax, ay, awidth, aheight);
			_speed = 2 + Math.random() * 10;
			var offset: Number = -awidth / 2 - (width * Math.random()) * 0.3;
			_spot = new ts_elipse(this, offset, offset, 
						awidth, aheight, styleClass);
			addEvent(Event.ENTER_FRAME, doFrame);
		}
		
		protected function doFrame(e: Event): void {
			rotation += _speed;
		} 
		
	}
}